<?php
	/**
	 * extra view of river item
	 * replaces the default wrappers inner div
	 * performer and time,maybe comment of a river item
	 *
	 * @package ImprovedRiverDashboard
	 */
	/**
	 * @author Snow.Hellsing <snow.hellsing@firebloom.cc>
	 * @copyright FireBloom Studio
	 * @link http://firebloom.cc
	 */
	$performed_by = $vars['performed_by'];
	$object = $vars['object'];
	$body = $vars['body'];
	$time = $vars['time']?$vars['time']:$object->time_created;
	$show_comment = $vars['show_comment'];
	$join_group = $vars['join_group'];
	$group_guid = $vars['group_guid'];
	$add_video = $vars['add_video'];
	$vote = $vars['vote'];

	echo '</div>';//break from basic_river_item_view?>
<div style="padding:10px 0">
<?php
	echo elgg_view("profile/icon",
    					array(
    						'entity' => $performed_by,
    						'size' => 'small')); ?>

<div class="obj_guid js_meta"><?php echo $object->guid;?></div>
<div class="item_body">
	<?php echo $body; ?>
</div>
<div class="item_info">
	<img src="<?php echo $vars['url']; ?>mod/riverdashboard/graphics/clock_icon.gif" width="11px" height="11px" /><span style="font-size:11px;"> <?php echo friendly_time($time); ?> 
<?php
	if ($show_comment) {
		?>
		- <a href="" class="toggle_comment">(<span class="comment_cnt"><?php echo count_annotations($object->guid,'','','generic_comment');?></span>)&nbsp;<?php echo elgg_echo('river:item:toggle_comments');?></a> 
		<?php
	}
	if ($join_group) {
		?>
		- <a href="<?php echo $vars['url'] . "action/groups/join?group_guid=" . $group_guid; ?>"><?php echo elgg_echo('river:join'); ?></a>
        <?php
	}
	if ($add_video) {
		?>
		- <a href="<?php echo $vars['url'] . "pg/izap_videos/" . get_loggedin_user()->username . "/add" ?>"><img src="<?php echo $vars['url']?>mod/izap_videos/graphics/upload.png" height="12" width="12"/> <?php echo elgg_echo('river:uploadVideo') ?></a>
	<?php
	}
	if ($vote) {
	    ?>
        - <a href="" class="toggle_vote"><img src="<?php echo $vars['url']?>mod/riverdashboard/graphics/vote_icon.gif" height="12" width="12"/> <?php echo elgg_echo('river:vote');?></a></span>
    <?php
	}
	?>
    

</div>
<?php
    if ($vote) {
	  echo "<div class=\"item_vote\">";
      echo elgg_view('river/forms/vote',array('entity' => $object));
      echo "</div>";
	}// if ($vote)
?>

<?php
	if ($show_comment) {
      echo "<div class=\"item_comments\">";
      echo getRiverItemComments($object->guid);
      echo "</div>";
      echo "<div class=\"item_comment_form\">";
	  echo elgg_view('river/forms/comment',array('entity' => $object));
      echo "</div>";
    }//if ($show_comment)
?>

<?php
	echo '<div class="hide_basic_river_item_view_time">';//hide friendly time div in basic view
?>
</div>